#include "menu.h"

MenuItem::MenuItem(int x, int y, int width, int height)
{
	this->x = x;
	this->y = y;

	this->width = width;
	this->height = height;

	this->next = 0;
}

MenuItem::~MenuItem()
{
	if (next !=0)
	{
		delete next;
	}
}

bool MenuItem::checkBounds(int posX, int posY)
{
	if ( posX >= x && posX <= x+width)
	{
		if ( posY >= y && posY <= y+height)
		{
		        return true;
		}
	}
	return false;
}